package com.xhblog.controller;

import com.xhblog.result.Result;
import com.xhblog.service.TagService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author pengyouhong
 * create 2022/5/18 14:13
 */

@RestController
@RequestMapping("tags")
public class TagController {

    @Resource
    private TagService tagService;

    @GetMapping("hot")
    public Result hots() {
        int limit = 6;
        return tagService.hots(limit);
    }
}
